/*
 * @Author: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @Date: 2025-09-03 02:00:15
 * @LastEditors: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @LastEditTime: 2025-10-22 14:25:53
 * @FilePath: \keep_motion_api\routes\community.route.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const express = require('express');
const router = express.Router();

const { posts, collections, likes } = require('@/controllers/admin/community');

// 帖子管理路由
router.get('/posts', posts.getPosts);
router.delete('/posts/:id', posts.deletePost);
router.patch('/posts/pin', posts.pinPost);
router.delete('/posts/comments', posts.deleteComment);

// 收藏管理路由
router.get('/collections', collections.getCollections);
router.post('/collections', collections.createCollection);
router.delete('/collections/:id', collections.deleteCollection);
router.get('/collections/stats', collections.getStats);

// 点赞管理路由
router.get('/likes', likes.getLikes);
router.post('/likes', likes.createLike);
router.delete('/likes/:id', likes.deleteLike);
router.get('/likes/stats', likes.getStats);

module.exports = router;